#include <bits/stdc++.h>
using namespace std;
int n,r[100005];
bool b[100005],l[100005];
int main()
{

    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    bool p = 1;
    for(int i = 1;i <= n;i++)
    {
        cin >> r[i];
        if(r[i] > 2){
            p = 0;
        }
    }
    if(p)
    {
        int num = 0;
        for(int i = 1;i <= n;i++)
        {
            if(r[i] == 2){
              num++;
            }
        }
        cout << n-num;
        return 0;
    }
    int ans = n;
    sort(r+1,r+n+1);

    for(int i = 1;i <= n;i++)
    {
        if(l[i])
            continue;
        else
        {
            for(int j = i+1;j <= n;j++)
            {
                if(r[j]>r[i] && b[j]==0)
                {
                    b[i]=1;
                    b[j]=1;
                    l[i]=1;
                    ans--;
                    break;
                }
            }
        }
    }
    cout << ans;
    return 0;
}
